<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>区域掩模</title>
<head th:replace="/include/header::header"/>
<link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
<!-- <script src="/static/js/jquery.min.js" type="text/javascript" charset="utf-8"></script> -->
<style>
body,html,#container{ margin:0;width: 100%;height: 100%}
</style>
</head>
<body>
<div id="mainBox">	
	<div class="header">
		<span class="header-ziti">
			<a href="#">首页</a><b class="header-bb">/</b>
			<a href="#">演示</a><b class="header-bb">/</b>
			<a style="color: #666;">3d地图</a>
			<a class="search-tu" href="javascript:location.replace(location.href);">
			<i class="iconfont icon-refresh" style="font-size: 19px;"></i>
			</a>
		</span>
	</div>
</div>
<div id="container">
<div class="inp" style="width: auto;">
   <p><img src="https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png" alt="" style="width: 23px;height: 25px;"/>聚合区</p>
   <p><img src="https://a.amap.com/jsapi_demos/static/images/green.png" alt="" style="width: 23px;height: 25px;"/>正常</p>
   <p><img src="https://a.amap.com/jsapi_demos/static/images/blue.png" alt="" style="width: 23px;height: 25px;"/>预警</p>
   <p><img src="https://a.amap.com/jsapi_demos/static/images/orange.png" alt="" style="width: 23px;height: 25px;"/>故障</p>
</div>
</div>
<div class="input-card">
    <h4>下属行政区查询</h4>
    <!-- <div class="input-item">
        <div class="input-item-prepend"><span class="input-item-text" >省市区</span></div>
        <select id='province' style="width:100px" onchange='search(this)'></select>
    </div> -->
    <!-- <div class="input-item">
        <div class="input-item-prepend"><span class="input-item-text" >地级市</span></div>
        <select id='city' style="width:100px" onchange='search(this)'></select>
    </div> -->
    <div class="input-item">
        <div class="input-item-prepend"><span class="input-item-text" >区县</span></div>
        <select id='district' style="width:100px" onchange='setCenter(this)'></select>
    </div>
    <!-- <div class="input-item">
        <div class="input-item-prepend"><span class="input-item-text" >街道</span></div>
        <select id='street' style="width:100px" onchange='search(this)'></select>
    </div> -->
</div>
  <div class="info" style="display:none;">
    <h4>地图限制区域信息</h4>
    <p>NorthEast坐标：<span id="ne" class="lnglat">114.217175,22.626129</span></p>
    <p>SouthWest坐标：<span id="sw" class="lnglat">114.37682,22.631833</span></p>
  </div>
</div>


<script language="javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=53e24fdc7dac2e0de238c39f125295de&plugin=Map3D,AMap.DistrictSearch"></script> 
<script language="javascript">
let points ={
		"status": "1",
		"count": "887",
		"info": "OK",
		"infocode": "10000",
		"suggestion": {
			"keywords": [],
			"cities": []
		},
		"pois": [{
			"id": "B0FFK377YB",
			"parent": [],
			"childtype": [],
			"name": "水木华程充电站",
			"tag": [],
			"type": "汽车服务;汽车服务相关;汽车服务相关",
			"typecode": "010000",
			"biz_type": [],
			"address": "玉岭路1号",
			"location": "114.245787,22.742603",
			"tel": "000-8765432",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440307",
			"adname": "龙岗区水木华",
			"importance": [],
			"shopid": [],
			"shopinfo": 300,
			"poiweight": "4V",
			"gridcode": "40℃",
			"distance": "2A",
			"navi_poiid": [],
			"entr_location": "114.246135,22.742729",
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend": 1,
			"timestamp": "2019-07-11 21:37:49",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/cb790954ae82a220545858cff67ab151"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/b57e7daa00924977209dce7888c887cc"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/35433b2eaab416fa1aa920e0b00acd0a"
			}]
		}, {
			"id": "B0FFH92EVF",
			"parent": [],
			"childtype": [],
			"name": "中国普天力能加电站西乡站",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "盐田新一村九巷蚝业雅苑对面",
			"location": "113.86342,22.576493",
			"tel": "3246575-223232",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440306",
			"adname": "普天力宝",
			"importance": [],
			"shopid": [],
			"shopinfo": "110",
			"poiweight": "33V",
			"gridcode": "33℃",
			"distance": "21A",
			"navi_poiid": "F49F018047_323667;19370",
			"entr_location": "113.862948,22.57642",
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend":2,
			"timestamp": "2019-07-10 11:10:05",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [{
				"id": " B02F38STBP ",
				"name": " 中国普天力能加电站西乡站停车场 ",
				"sname": " 停车场 ",
				"location": "113.863551,22.576643",
				"address": " 悦和路与新湖路交叉口东北200米 ",
				"distance": " 0 ",
				"subtype": "停车场",
				"typecode": " 150900 "
			}],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/55ba15f2a310989dd8c1b682"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/b038b296d5031845c14e23f019a80dae"
			}]
		}, {
			"id": "B0FFHJJ6FR",
			"parent": [],
			"childtype": [],
			"name": "特来电汽车充电站(深圳银星工业园)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "观光路1301号银星高科技工业园",
			"location": "114.047298,22.729643",
			"tel": "4001300001",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440309",
			"adname": "特来电",
			"importance": [],
			"shopid": [],
			"shopinfo": "150",
			"poiweight": "33V",
			"gridcode": "33℃",
			"distance": "55A",
			"navi_poiid": "F50F016001_375775",
			"entr_location": [],
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend": 3,
			"timestamp": "2019-07-15 14:19:03",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": "4.6",
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/b8e6c63cefadc40adf7f62f9182d1c75"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/3eb1acf1e5d084e91e7d7d596d150b50"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/d1ef87b5605142e7b73eeca6383a7e9d"
			}]
		}, {
			"id": "B0FFJ1JNWA",
			"parent": [],
			"childtype": [],
			"name": "爱狗新能源充电站(外经工业园爱狗)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "福前路宝安外经工业园内",
			"location": "114.027867,22.717093",
			"tel": "0755-22906890",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440309",
			"adname": "爱狗新能",
			"importance": [],
			"shopid": [],
			"shopinfo": "200",
			"poiweight": "77V",
			"gridcode": "72℃",
			"distance": "55A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend": 1,
			"timestamp": "2019-07-03 19:19:27",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/498F782ED33D433F9C4CC363B5DE2C28"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/4207F60366C54ECD95A8D901C8A436C5"
			}]
		}, {
			"id": "B0FFJ0Y3UZ",
			"parent": [],
			"childtype": [],
			"name": "通途i·Go充电站(朗山酒店站)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "朗山路7号",
			"location": "113.950921,22.556101",
			"tel": "0755-22906890",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440305",
			"adname": "通途i·Go",
			"importance": [],
			"shopid": [],
			"shopinfo": "222",
			"poiweight": "54V",
			"gridcode": "23℃",
			"distance": "19A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": "科技园",
			"exit_location": [],
			"match": "0",
			"recommend": 2,
			"timestamp": "2019-07-14 23:29:45",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/F10B64D401A5460499B748EDE4209FBF"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/86368318E90F448FAB7F837C59FDA2E1"
			}]
		}, {
			"id": "B0FFJS7XU7",
			"parent": [],
			"childtype": [],
			"name": "水木华程汽车充电站(中信龙盛充电站)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "龙岗街道兰州牛肉拉面(中信店)中信龙盛广场",
			"location": "114.297684,22.722884",
			"tel": "0755-89568643",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440307",
			"adname": "纽拉",
			"importance": [],
			"shopid": [],
			"shopinfo": "240",
			"poiweight": "34V",
			"gridcode": "22℃",
			"distance": "10A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend": 3,
			"timestamp": "2019-07-15 00:58:56",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/3103d90a0e77f8c305f1bfc91f10b447"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/d95be0dd7e50d1c0bbb975438df09d7a"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/36bb70be9544bced2ca2f85a73c6ddc7"
			}]
		}, {
			"id": "B0FFGODF3H",
			"parent": [],
			"childtype": [],
			"name": "盛弘充电汽车充电站",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "西乡大道588附近",
			"location": "113.869816,22.578177",
			"tel": "12321321321",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "盛弘",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440306",
			"adname": "奥术大师",
			"importance": [],
			"shopid": [],
			"shopinfo": "222",
			"poiweight": "38V",
			"gridcode": "42℃",
			"distance": "25A",
			"navi_poiid": "F49F018047_319574",
			"entr_location": [],
			"business_area": "新安",
			"exit_location": [],
			"match": "0",
			"recommend": 1,
			"timestamp": "2019-07-04 17:08:09",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/55ba15f2a310989dd8c1b682"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/b038b296d5031845c14e23f019a80dae"
			}]
		}, {
			"id": "B0FFGK35HR",
			"parent": [],
			"childtype": [],
			"name": "中电绿源科陆电子智能柔性化充电站",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "坂李大道西150米",
			"location": "114.067130,22.662784",
			"tel": "111111",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440307",
			"adname": "534",
			"importance": [],
			"shopid": [],
			"shopinfo": "214",
			"poiweight": "31V",
			"gridcode": "42℃",
			"distance": "25A",
			"navi_poiid": "F50F017001_129829",
			"entr_location": "114.067726,22.663340",
			"business_area": "坂田",
			"exit_location": [],
			"match": "0",
			"recommend": 3,
			"timestamp": "2019-06-07 01:01:14",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/55ba15f2a310989dd8c1b682"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/b038b296d5031845c14e23f019a80dae"
			}]
		}, {
			"id": "B0FFG05XZP",
			"parent": [],
			"childtype": [],
			"name": "宝龙比亚迪充电桩",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "宝坪路",
			"location": "114.273635,22.682958",
			"tel": "111111",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440307",
			"adname": "457",
			"importance": [],
			"shopid": [],
			"shopinfo": "111",
			"poiweight": "8V",
			"gridcode": "0℃",
			"distance": "21A",
			"navi_poiid": [],
			"entr_location": "114.273715,22.682947",
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend": 1,
			"timestamp": "2019-07-04 10:32:36",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/55ba15f2a310989dd8c1b682"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/b038b296d5031845c14e23f019a80dae"
			}]
		}, {
			"id": "B0FFJ7GGY3",
			"parent": [],
			"childtype": [],
			"name": "水木华程充电站(信义御城)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "横岗街道松柏路177号天虹商场(松柏店)",
			"location": "114.211250,22.649281",
			"tel": "0755-89568643",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440307",
			"adname": "松柏",
			"importance": [],
			"shopid": [],
			"shopinfo": "123",
			"poiweight": "0.1V",
			"gridcode": "0.1℃",
			"distance": "0.2A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": "横岗",
			"exit_location": [],
			"match": "0",
			"recommend": 2,
			"timestamp": "2019-07-14 23:30:08",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/10f7c9a4ea502370f6335b340ad6b706"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/ed1ffab7fb9de7d398d46e036977b882"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/8e6af76a8efb5ca6fbec607726e39314"
			}]
		}, {
			"id": "B0FFHU76DS",
			"parent": [],
			"childtype": [],
			"name": "粤沃科技华远充电站",
			"tag": [],
			"type": "汽车服务;汽车服务相关;汽车服务相关",
			"typecode": "010000",
			"biz_type": [],
			"address": "平安大道路西",
			"location": "114.131719,22.686241",
			"tel": "435678976543",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440307",
			"adname": "牢笼",
			"importance": [],
			"shopid": [],
			"shopinfo": "99",
			"poiweight": "21V",
			"gridcode": "40℃",
			"distance": "27A",
			"navi_poiid": [],
			"entr_location": "114.131436,22.686137",
			"business_area": "平湖",
			"exit_location": [],
			"match": "0",
			"recommend": 3,
			"timestamp": "2019-05-28 12:02:31",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/55ba15f2a310989dd8c1b682"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/b038b296d5031845c14e23f019a80dae"
			}]
		}, {
			"id": "B0FFHJJ6FD",
			"parent": [],
			"childtype": [],
			"name": "朗山酒店小鹏超级汽车充电站",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": [],
			"location": "113.950567,22.556197",
			"tel": "1111123435456",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440305",
			"adname": "123",
			"importance": [],
			"shopid": [],
			"shopinfo": "300",
			"poiweight": "75V",
			"gridcode": "46℃",
			"distance": "62A",
			"navi_poiid": "F49F018048_401895",
			"entr_location": [],
			"business_area": "科技园",
			"exit_location": [],
			"match": "0",
			"recommend": 1,
			"timestamp": "2019-07-14 15:53:31",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/ff4a031817a07bf1734180a22ff83aec"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/1c1694dabf534886772a3e4a821f9197"
			}]
		}, {
			"id": "B0FFH6D5L8",
			"parent": [],
			"childtype": [],
			"name": "望海路充电站",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "望海路北与中心路交汇处",
			"location": "113.944156,22.487249",
			"tel": "4001000522",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440305",
			"adname": "aaS",
			"importance": [],
			"shopid": [],
			"shopinfo": "312",
			"poiweight": "86V",
			"gridcode": "60℃",
			"distance": "22A",
			"navi_poiid": "F49F019048_316635",
			"entr_location": "113.944191,22.487143",
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend": 2,
			"timestamp": "2019-07-14 23:30:33",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/7051d844da79b9c3c4aec25e1805ad52"
			}, {
				"title": [],
				"url": "http:\/\/aos-cdn-image.amap.com\/sns\/ugccomment\/430324e3-dcc5-4c35-8582-814a6461faf8.jpg"
			}, {
				"title": [],
				"url": "http:\/\/aos-cdn-image.amap.com\/sns\/ugccomment\/71e9759c-a521-4da7-bbb8-42b5781061eb.jpg"
			}]
		}, {
			"id": "B0FFI6N72Y",
			"parent": [],
			"childtype": [],
			"name": "特来电汽车充电站(深圳炜东城百货)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "光明区光明新区田寮路3号",
			"location": "113.905719,22.726231",
			"tel": "4001300001",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440311",
			"adname": "股份",
			"importance": [],
			"shopid": [],
			"shopinfo": "330",
			"poiweight": "30V",
			"gridcode": "40℃",
			"distance": "22A",
			"navi_poiid": "F49F016048_251258",
			"entr_location": [],
			"business_area": "光明",
			"exit_location": [],
			"match": "0",
			"recommend": 2,
			"timestamp": "2019-07-15 00:58:11",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": "4.2",
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/7fd76d5b400964e9653cd7395acbefdc"
			}]
		}, {
			"id": "B0FFGGYI76",
			"parent": [],
			"childtype": [],
			"name": "中国普天力能加电站(月亮湾站)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "妈湾大道与月亮湾大道交叉口东南100米",
			"location": "113.874772,22.492069",
			"tel": "125678564643",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440305",
			"adname": "撒换个",
			"importance": [],
			"shopid": [],
			"shopinfo": "165",
			"poiweight": "35V",
			"gridcode": "42℃",
			"distance": "2A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": [],
			"exit_location": [],
			"match": "0",
			"recommend": 3,
			"timestamp": "2019-07-09 22:50:28",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/59254ce38ce1662abfb8aec68a741fe5"
			}]
		}, {
			"id": "B0FFI96BLT",
			"parent": [],
			"childtype": [],
			"name": "特来电充电站(深圳鹏森海纳1期)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "光明区光明新区光桥路与东长路交汇处鹏森海纳中心",
			"location": "113.925261,22.724661",
			"tel": "4001300001",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440311",
			"adname": "河钢股份",
			"importance": [],
			"shopid": [],
			"shopinfo": "266",
			"poiweight": "32V",
			"gridcode": "44℃",
			"distance": "21A",
			"navi_poiid": [],
			"entr_location": "113.92521,22.724952",
			"business_area": "光明",
			"exit_location": [],
			"match": "0",
			"recommend": 1,
			"timestamp": "2019-07-15 00:58:13",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": "3.9",
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/27ba6565e40fa436d5ef1c23a09520db"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/8de3a603bed0ad914c2ee7c9fbfbb2b1"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/9b466025c03d18d89e1f74ed99e09e74"
			}]
		}, {
			"id": "B0FFI96BLS",
			"parent": [],
			"childtype": [],
			"name": "特来电充电站(深圳华润万家1期)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "沙井镇新沙路与中心路交汇深明丰大厦",
			"location": "113.828364,22.728288",
			"tel": "4001300001",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440306",
			"adname": "奥术大啊",
			"importance": [],
			"shopid": [],
			"shopinfo": "300",
			"poiweight": "70V",
			"gridcode": "50℃",
			"distance": "6A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": "沙井",
			"exit_location": [],
			"match": "0",
			"recommend": 2,
			"timestamp": "2019-07-15 00:58:27",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": "4.2",
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/262149c161358ec9c6fc1f2d32a1faf1"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/d7d055ba0d86cfbaa43ed85f636c4c2a"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/51f79aedb5a26e07f4beeea35c3748a9"
			}]
		}, {
			"id": "B0FFI8ED8K",
			"parent": [],
			"childtype": [],
			"name": "特来电汽车充电站(深圳华润万家2期)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "沙井镇新沙路与中心路交汇深明丰大厦地上停车场",
			"location": "113.828413,22.728266",
			"tel": "4001300001",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440306",
			"adname": "45556",
			"importance": [],
			"shopid": [],
			"shopinfo": "262",
			"poiweight": "5V",
			"gridcode": "40℃",
			"distance": "4A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": "沙井",
			"exit_location": [],
			"match": "0",
			"recommend": 3,
			"timestamp": "2019-07-14 17:58:44",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": "4.2",
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/cbe9b67189d0fb602547b71885e82e08"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/8082e7a8fcff6d9ee723f1aa3c09b81a"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/df86ecf818358c0610ec8399945f6bbd"
			}]
		}, {
			"id": "B0FFIETQHT",
			"parent": [],
			"childtype": [],
			"name": "水木华程充电站(振业城)",
			"tag": [],
			"type": "汽车服务;充电站;充电站",
			"typecode": "011100",
			"biz_type": [],
			"address": "横岗街道大山地路正大同堂",
			"location": "114.180438,22.645770",
			"tel": "0755-89568643",
			"postcode": [],
			"website": [],
			"email": [],
			"pcode": "440000",
			"pname": "广东省",
			"citycode": "0755",
			"cityname": "深圳市",
			"adcode": "440307",
			"adname": "768987",
			"importance": [],
			"shopid": [],
			"shopinfo": "123",
			"poiweight": "54V",
			"gridcode": "34℃",
			"distance": "65A",
			"navi_poiid": [],
			"entr_location": [],
			"business_area": "横岗",
			"exit_location": [],
			"match": "0",
			"recommend": 1,
			"timestamp": "2019-07-14 23:29:13",
			"alias": [],
			"indoor_map": "0",
			"indoor_data": {
				"cpid": [],
				"floor": [],
				"truefloor": [],
				"cmsid": []
			},
			"groupbuy_num": "0",
			"discount_num": "0",
			"biz_ext": {
				"rating": [],
				"cost": []
			},
			"event": [],
			"children": [],
			"photos": [{
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/5852fed72a94634e5cbe74219b4c5228"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/f6b17e92da35cfe6053090a9fdaecd06"
			}, {
				"title": [],
				"url": "http:\/\/store.is.autonavi.com\/showpic\/65996723d6d4fa0781257d1ea7e17541"
			}]
		}]
	}	
	function getData(data,level,type,map) {
			if(type=="1"){
		var bounds = data.boundaries;
		// return
        if (bounds) {
            for (var i = 0, l = bounds.length; i < l; i++) {
                var polygon = new AMap.Polygon({
                    map: map,
                    strokeWeight: 1,
                    strokeColor: '#0091ea',
                    fillColor: 'red',
                    fillOpacity: 0.2,
                    path: bounds[i]
				});
				
                polygons.push(polygon);
			}
			}
           
        }
	   console.log(2)
	   console.log(level)
        //清空下一级别的下拉列表
        if (level === 'province') {
            citySelect.innerHTML = '';
            districtSelect.innerHTML = '';
            areaSelect.innerHTML = '';
        } else if (level === 'city') {
            districtSelect.innerHTML = '';
            areaSelect.innerHTML = '';
        } else if (level === 'district') {
            // areaSelect.innerHTML = '';
        }
		console.log(data)
		if(level === 'district'){
			return
		}
		var subList = data.districtList;
		console.log(subList)
        if (subList) {
			console.log(22)
            var contentSub = new Option('--请选择--');
            var curlevel = subList[0].level;
            var curList =  document.querySelector('#' + curlevel);
            curList.add(contentSub);
            for (var i = 0, l = subList.length; i < l; i++) {
                var name = subList[i].name;
                var levelSub = subList[i].level;
                var cityCode = subList[i].citycode;
                contentSub = new Option(name);
                contentSub.setAttribute("value", levelSub);
                contentSub.center = subList[i].center;
                contentSub.adcode = subList[i].adcode;
                curList.add(contentSub);
            }
        }
        
    }
    function setCenter(obj){
		map.setCenter(obj[obj.options.selectedIndex].center)
		console.log(map)
		console.log(23123)
			   for (var i = 0, l = polygons.length; i < l; i++) {
				   polygons[i].setMap(null);
			   }
			   var option = obj[obj.options.selectedIndex];
			   var keyword = option.text; //关键字
			   var adcode = option.adcode;
			   district.setLevel(option.value); //行政区级别
			   district.setExtensions('all');
			   district.search(adcode, function(status, result) {
				   if(status === 'complete'){
					   getData(result.districtList[0],obj.id,1,map);
				   }
			   });
	}
	function search(obj) {
				 console.log(23123333333333333)
			   for (var i = 0, l = polygons.length; i < l; i++) {
				   polygons[i].setMap(null);
			   }
			   var option = obj[obj.options.selectedIndex];
			   var keyword = option.text; //关键字
			   var adcode = option.adcode;
			   district.setLevel(option.value); //行政区级别
			   district.setExtensions('all');
			   district.search(adcode, function(status, result) {
				   if(status === 'complete'){
					   getData(result.districtList[0],obj.id,1);
				   }
			   });
	}
		  var map, district, polygons = [], citycode;
		var citySelect = document.getElementById('city');
		var districtSelect = document.getElementById('district');
		var areaSelect = document.getElementById('street');
    //利用行政区查询获取边界构建mask路径
	//也可以直接通过经纬度构建mask路径
	var opts = {
        subdistrict: 0,
        extensions: 'all',
		level: 'city',
		subdistrict: 1,  
		showbiz:false 
	};
    var district = new AMap.DistrictSearch(opts);
    district.search('深圳市', function(status, result) {
		if(status=='complete'){
				console.log(result)
				getData(result.districtList[0]);
			}
        var bounds = result.districtList[0].boundaries;
        var mask = []
        for(var i =0;i<bounds.length;i+=1){
            mask.push([bounds[i]])
        }
        map = new AMap.Map('container', {
            mask:mask,
            center:[114.217175,22.626129],
            mapStyle:'amap://styles/6a577c65b62ea85d13e2c84fcb43cf64',
            disableSocket:true,
            buildingAnimation: false,
            resizeEnable: true,
            showIndoorMap: false,
            viewMode:'3D',
            showLabel:true,
            labelzIndex:130,
            pitch:45,
            zoom:11,
            layers: [//只显示默认图层的时候，layers可以缺省
            new AMap.TileLayer()//高德默认标准图层
        ],
        });
        function logMapInfo() {
            var limitBounds = map.getLimitBounds();
            if (limitBounds) {
              document.querySelector("#ne").innerText = limitBounds.northeast.toString();
              document.querySelector("#sw").innerText = limitBounds.southwest.toString();
            } else {
              document.querySelector("#ne").innerText = document.querySelector("#sw").innerText = "未限定";
            }
		  }
		 	
		  
		 
          //限制地图显示范围
          function lockMapBounds() {
            var bounds = map.getBounds();
            map.setLimitBounds(bounds);
            logMapInfo();
          }
          lockMapBounds();
          logMapInfo();
        var cluster, markers = [];        
        AMap.plugin([
            'AMap.ControlBar',
        ], function(){
            // 添加 3D 罗盘控制
            map.addControl(new AMap.ControlBar());
        });	
        var maskerOut = new AMap.Marker({//区域外的不会显示
            position:[117.001415,39.926055],
            map:map
        })
        //添加高度面
        var object3Dlayer = new AMap.Object3DLayer({zIndex:1});
        map.add(object3Dlayer)
        var height = -500;
        var color = '#ccc';//rgba
        var wall = new AMap.Object3D.Wall({
            path:bounds,
            height:height,
            color:color
        });
        wall.transparent = true
        object3Dlayer.add(wall)
        //添加描边
        for(var i =0;i<bounds.length;i+=1){
            new AMap.Polyline({
                path:bounds[i],
                strokeColor:'#6ac6db',
                strokeWeight:4,
                map:map
            })
        }
        for (var i = 0;i<points.pois.length;i++) {
      		if(points.pois[i].recommend==1){
      			var Markers = new AMap.Marker({
      	            position:[((points.pois[i].location).split(",")[0])*1,((points.pois[i].location).split(",")[1])*1],
      	            //content: '<div style="background-color: hsla(180, 100%, 50%, 0.7); height: 24px; width: 24px; border: 1px solid hsl(180, 100%, 40%); border-radius: 12px; box-shadow: hsl(180, 100%, 50%) 0px 0px 1px;"></div>',
      				offset: new AMap.Pixel(-13, -30),
      				icon: 'https://a.amap.com/jsapi_demos/static/images/blue.png',
      				title:points.pois[i].name,
      				content1:points.pois[i].type,
      				tel:points.pois[i].tel,
      				address:points.pois[i].address,
      				shopinfo:points.pois[i].shopinfo,
      				recommend:points.pois[i].recommend,
      				photos:points.pois[i].photos,
      				poiweight:points.pois[i].poiweight,
      				gridcode:points.pois[i].gridcode,
      				distance:points.pois[i].distance,
      				name:points.pois[i].name,
      				pname:points.pois[i].pname,
      				adname:points.pois[i].adname,
      			})
      		}else if(points.pois[i].recommend==2){
      			var Markers = new AMap.Marker({
      	            position:[((points.pois[i].location).split(",")[0])*1,((points.pois[i].location).split(",")[1])*1],
      	            //content: '<div style="background-color: hsla(180, 100%, 50%, 0.7); height: 24px; width: 24px; border: 1px solid hsl(180, 100%, 40%); border-radius: 12px; box-shadow: hsl(180, 100%, 50%) 0px 0px 1px;"></div>',
      				offset: new AMap.Pixel(-13, -30),
      				icon: 'https://a.amap.com/jsapi_demos/static/images/green.png',
      				title:points.pois[i].name,
      				content1:points.pois[i].type,
      				tel:points.pois[i].tel,
      				address:points.pois[i].address,
      				shopinfo:points.pois[i].shopinfo,
      				recommend:points.pois[i].recommend,
      				photos:points.pois[i].photos,
      				poiweight:points.pois[i].poiweight,
      				gridcode:points.pois[i].gridcode,
      				distance:points.pois[i].distance,
      				name:points.pois[i].name,
      				pname:points.pois[i].pname,
      				adname:points.pois[i].adname,
      			})
      		}else if(points.pois[i].recommend==3){
      			var Markers = new AMap.Marker({
      	            position:[((points.pois[i].location).split(",")[0])*1,((points.pois[i].location).split(",")[1])*1],
      	            //content: '<div style="background-color: hsla(180, 100%, 50%, 0.7); height: 24px; width: 24px; border: 1px solid hsl(180, 100%, 40%); border-radius: 12px; box-shadow: hsl(180, 100%, 50%) 0px 0px 1px;"></div>',
      				offset: new AMap.Pixel(-13, -30),
      				icon: 'https://a.amap.com/jsapi_demos/static/images/orange.png',
      				title:points.pois[i].name,
      				content1:points.pois[i].type,
      				tel:points.pois[i].tel,
      				address:points.pois[i].address,
      				shopinfo:points.pois[i].shopinfo,
      				recommend:points.pois[i].recommend,
      				photos:points.pois[i].photos,
      				poiweight:points.pois[i].poiweight,
      				gridcode:points.pois[i].gridcode,
      				distance:points.pois[i].distance,
      				name:points.pois[i].name,
      				pname:points.pois[i].pname,
      				adname:points.pois[i].adname,
      			})
      		}
      		let  Marker=Markers;
      		markers.push(Marker);
      		AMap.event.addListener(Marker, 'click', function(e) {	
      			markers.forEach(e1=>{
      				e1.setLabel({});
      			})
      			Marker.setAnimation('AMAP_ANIMATION_BOUNCE');
      			var msgcontent="<div class='info'>"+e.target.B.title+"<br />"+e.target.B.content1+"<br />"+e.target.B.tel+"<br />"+e.target.B.address+"</div>";
      			/*Marker.setLabel({	
      				offset: new AMap.Pixel(-100,-30),  
      				content:msgcontent,
      				direction: 'right' 
      			});*/
      			/* OnloadEvent(e.target.B.shopinfo,Marker.B)
      			var timeout=setTimeout(()=>{
      			     Marker.setAnimation(null);
      			  },10000); */
      		});
      	}
        
        var sts=[
          	{
          	url:"https://a.amap.com/jsapi_demos/static/images/darkRed.png",
          	size: new AMap.Size(48, 48),
            offset: new AMap.Pixel(-24, -24)
          	
          	}];
          function addCluster() {
              if (cluster) {
                  cluster.setMap(null);
              }
              cluster = map.plugin(["AMap.MarkerClusterer"],()=>{
                      cluster = new AMap.MarkerClusterer( map, markers,{styles:sts});
          		})	
          }
        var object3Dlayer = new AMap.Object3DLayer();
        addCluster();
        map.add(object3Dlayer);
    });
	</script>
	<script type="text/javascript" src="https://webapi.amap.com/demos/js/liteToolbar.js"></script>
	<script>
		  
	   </script>
</body>
</html>